import * as Sequelize from 'sequelize';
import sequelize from './../core/mysqlDb';

//退换货 列表
export interface ReturnList {
    id: number;
    returnId :string ;      //退货单号   根据它查
    facilityId:string;      //仓库编码   根据它查
    orderId:string;         //订单号
    returnTypeId:string;    //退货单类型
    statusId:string;        //退货单状态
    createdStamp:string;    //创建时间
}
export interface ReturnListstance extends Sequelize.Instance<ReturnList>, ReturnList {
}
// export const returnListModel = sequelize.define<ReturnListstance, ReturnList>('return_list', {
//     returnId:Sequelize.STRING,
//     facilityId:Sequelize.STRING,
//     orderId:Sequelize.STRING,
//     returnTypeId:Sequelize.STRING,
//     statusId:Sequelize.STRING,
//     createdStamp:Sequelize.STRING
// });

export const returnListModel = sequelize.define('return_list', {
    returnId:Sequelize.STRING,
    facilityId:Sequelize.STRING,
    orderId:Sequelize.STRING,
    returnTypeId:Sequelize.STRING,
    statusId:Sequelize.STRING,
    createdStamp:Sequelize.STRING
});

returnListModel.sync();
export default returnListModel;
